package dao.impl;

import dao.IUserDao;
import entity.User;
import util.FileUtil;
import java.util.List;

public class UserDaoImpl implements IUserDao {
    private static final String FILE = "users.dat";

    @Override
    public void save(List<User> users) {
        FileUtil.writeList(users, FILE);
    }

    @Override
    public List<User> load() {
        return FileUtil.readList(FILE);
    }
}